<div class="span9">
	<div class="row">
		<!-- Widget area -->
		<?php foreach($widgets as $w) : echo $w; endforeach; ?>

		<!-- Content area -->
		<div class="span6">
			<h4 class="title">Mina beställningar</h4>
			<div class="box">
				<?php if(count($orders) == 0) : ?>
					
					<strong>Du har inte gjort några tidigare beställningar som vi kan koppla till ditt konto</strong>
				
				<?php else : ?>
					<table class="order_list">
						<thead>
							<tr>
								<td>Datum</td>
								<td>Epost</td>
								<!--<td>Order</td>-->
								<td>Status</td>
							</tr>
						</thead>
						<tbody>
							<?php foreach($orders as $order) : ?>
							<?php 
								# Make stuff readable
								$shortorder = substr($order->order, 0, 100)."...";
								switch($order->status){
									case 1 : $status = "Order mottagen"; break;
									case 2 : $status = "Order behandlad"; break; 
									case 3 : $status = "Levererad"; break;
									default : $status = "Levererad"; break;
								}
							?>
								<tr>
									<td><?php echo $order->datum;?></td>
									<td><?php echo $order->email;?></td>
									<!--<td><?php echo $shortorder;?></td>-->
									<td><?php echo $status;?></td>
								</tr>
							<?php endforeach; ?>
						</tbody>
					</table>
				<?php endif; ?>
			</div>
		</div>
	</div>
</div>